package com.codingInn.web.adapter;

import com.codingInn.web.controller.MaiDiguaController;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerAdapter;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
public class MaiDiguaHandlerAdapter implements HandlerAdapter {
	@Override
	public boolean supports(Object handler) {
		return handler instanceof MaiDiguaController;
	}

	@Override
	public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
		return ((MaiDiguaController)handler).maidigua(request,response);
	}

	@Override
	public long getLastModified(HttpServletRequest request, Object handler) {
		return -1L;
	}
}
